<!DOCTYPE HTML>
<html>

<head>
  <title></title>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/static/h-ui/css/H-ui.min.css" />
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/static/h-ui.admin/css/H-ui.admin.css" />
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/lib/Hui-iconfont/1.0.8/iconfont.css" />
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/static/h-ui.admin/skin/default/skin.css" id="skin" />
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/static/h-ui.admin/css/style.css" />
  <style>
    .box_a {
      display: flex;
    }

    .box_a>div:nth-child(1) {
      width: 50%;
      text-align: left;
    }

    .box_a>div:nth-child(2) {
      width: 50%;
      text-align: right;
    }

    .buta {
      width: 60px;
      background: #fff;
      border: 1px solid #d2d2d2;
      border-radius: 4px;
      height: 30px;
      cursor: pointer;
    }

    .dataTables_wrapper .dataTables_paginate {
      text-align: left !important;
    }

    .keys {
      margin: 0 50px
    }
  </style>
</head>

<body>
  <include file="header" />
  <include file="aside" />
  <!--<nav class="breadcrumb">-->
  <!--<i class="Hui-iconfont">&#xe67f;</i>API列表-->
  <!--&lt;!&ndash;<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>&ndash;&gt;-->
  <!--</nav>-->
  <div class="page-container interface_manage Hui-article-box">
    <div class="text-c box_a">
      <div>
        日期范围：
        <input type="text" onfocus="WdatePicker({ maxDate:'#F{'.$dp.$D.'(\'logmax\')||\'%y-%M-%d\'}' })" id="logmin" class="input-text Wdate" style="width:150px;">
        <input type="text" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'logmin\')}',maxDate:'%y-%M-%d' })" id="logmax" class="input-text Wdate" style="width:150px;">

        <button name="" id="" class="btn btn-success" type="submit">
                    <i class="Hui-iconfont">&#xe665;</i>查询
                </button>
      </div>
      <div>
        状态：
        <select class="select" name="brandclass" size="1" style="width:75px;height: 31px;position: relative;top: 2px;">
                    <option value="0" selected>开启</option>
                    <option value="1">关闭</option>
                </select>
        <input type="text" name="" id="" placeholder="模糊搜索" style="width:150px" class="input-text">
        <button name="" id="" class="btn btn-success" type="submit">
                    <i class="Hui-iconfont">&#xe665;</i> 搜索</button>
      </div>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20">
      <span class="l">
                接口管理
            </span>
      <span class="l keys">
            accessKey：{$data.0.accessKey}
          </span>
      <span class="l keys">
            secretKey：{$data.0.secretKey}
          </span>
      <span class="l">
            <button class="btn radius">
                <i class="Hui-iconfont">&#xe66b;</i>重置
            </button>
          </span>
      <span class="r">共有数据：
                <strong>{$total.total}</strong> 条</span>
    </div>
    <table class="table table-border table-bordered table-bg table-hover table-sort">
      <thead>
        <tr class="text-c">
          <th>接口类型</th>
          <th>价格</th>
          <th>创建时间</th>
          <th>状态</th>
          <!-- <th>accessKey</th>
          <th>secretKey</th>
          <th>重置</th> -->
        </tr>
      </thead>

      <if condition="!empty( $data )">
        <volist name="data" id="list" key="k">
          <tbody>
            <tr class="text-c">
              <td>{$list.category}</td>
              <td>{$list.price}元/次</td>
              <td>2018-02-15</td>
              <td>开启</td>
              <!-- <td>{$list.accessKey}</td> -->
              <!-- <td>{$list.secretKey}</td> -->
              <!-- <td onclick="resetKey()">
                <i class="glyphicon glyphicon-refresh"></i>
                <img src="__PUBLIC__/images/iconc.png" style="position: relative;right: 5px;top: -3px;width:25px;height: 25px;">重置Key
              </td> -->
            </tr>
          </tbody>
        </volist>
        <else/>
        <tbody>
          <tr class="text-c">
            <td colspan="7">暂时无数据</td>
          </tr>
        </tbody>
      </if>

    </table>
    {$page}

    <div id="pageNav" class="pageNav"></div>
  </div>
  <script type="text/javascript" src="__PUBLIC__/Admin/lib/jquery/1.9.1/jquery.min.js"></script>
  <script type="text/javascript" src="__PUBLIC__/Admin/lib/layer/2.4/layer.js"></script>
  <script type="text/javascript" src="__PUBLIC__/Admin/static/h-ui/js/H-ui.min.js"></script>
  <script type="text/javascript" src="__PUBLIC__/Admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  <script type="text/javascript" src="__PUBLIC__/Admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  <script type="text/javascript" src="__PUBLIC__/Admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
  <script type="text/javascript" src="__PUBLIC__/Admin/lib/laypage/1.2/laypage.js"></script>

</body>

</html>

<script type="text/javascript">
  function resetKey() {
    $.ajax({
      type: "post",
      url: "{:U('Admin/resetKey')}",
      data: {},
      success: function(result) {
        if (result == 10) {
          layer.msg('操作成功', {
            icon: 1
          });
          window.location.reload();
        } else {
          layer.msg('操作失败', {
            icon: 5
          });
          return false;

        }
      }
    })
  }
</script>
